using System;
using System.Collections.Generic;
using System.Text;

namespace Universe.Remoting
{
    public class Locator
    {
        public string Host;
        public int Port;

        public Locator()
        {
        }

        public Locator(int port)
        {
            Port = port;
        }


        public Locator(string host, int port)
        {
            Host = host;
            Port = port;
        }

        public static readonly Locator InProcess = new Locator();

        public override bool Equals(object obj)
        {
            Locator other = obj as Locator;
            if (other == null)
                return false;

            return this.Host == other.Host && this.Port == other.Port;
        }

        public override int GetHashCode()
        {
            return (Host == null ? 0 : Host.GetHashCode()) ^ Port;
        }






    }
}